package vista;
import java.awt.BorderLayout;
import java.awt.LayoutManager;

import javax.swing.BorderFactory;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;

import javax.swing.WindowConstants;
import javax.swing.border.BevelBorder;
import javax.swing.border.SoftBevelBorder;
import javax.swing.table.AbstractTableModel;
import javax.swing.SwingUtilities;


/**
* This code was edited or generated using CloudGarden's Jigloo
* SWT/Swing GUI Builder, which is free for non-commercial
* use. If Jigloo is being used commercially (ie, by a corporation,
* company or business for any purpose whatever) then you
* should purchase a license for each developer using Jigloo.
* Please visit www.cloudgarden.com for details.
* Use of Jigloo implies acceptance of these licensing terms.
* A COMMERCIAL LICENSE HAS NOT BEEN PURCHASED FOR
* THIS MACHINE, SO JIGLOO OR THIS CODE CANNOT BE USED
* LEGALLY FOR ANY CORPORATE OR COMMERCIAL PURPOSE.
*/
public class VentanaConsultarProductos extends javax.swing.JFrame {
	private JPanel panContenedor;
	private JScrollPane scpDisponibilidad;
	private JLabel lbldisponibilidadProductos;
	private JTable tblListado;
	//private LayoutManager jPanelContenedorLayout;

	/**
	* Auto-generated main method to display this JFrame
	*/
	
	public VentanaConsultarProductos() {
		super();
		initGUI();
	}
	
	private void initGUI() {
		try {
			setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
			{
				panContenedor = new JPanel();
				getContentPane().add(panContenedor, BorderLayout.CENTER);
				panContenedor.setLayout(null);
				panContenedor.setPreferredSize(new java.awt.Dimension(382, 194));
				panContenedor.setFont(new java.awt.Font("Comic Sans MS",0,12));
				{
					lbldisponibilidadProductos = new JLabel();
					panContenedor.add(lbldisponibilidadProductos);
					lbldisponibilidadProductos.setText("     Disponibilidad de Productos");
					lbldisponibilidadProductos.setBounds(56, 22, 364, 52);
					lbldisponibilidadProductos.setFont(new java.awt.Font("Comic Sans MS",0,22));
					lbldisponibilidadProductos.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
				}
				{
					scpDisponibilidad = new JScrollPane();
					panContenedor.add(scpDisponibilidad);
					scpDisponibilidad.setBounds(41, 86, 394, 179);
				}
				tblListado = new JTable();
				scpDisponibilidad.setViewportView(tblListado);
			}
			pack();
			this.setSize(484, 325);
		} catch (Exception e) {
		    //add your error handling code here
			e.printStackTrace();
		}
	}

	public void setListado(AbstractTableModel abstractTableModel){
		tblListado.setModel(abstractTableModel);
	}
	
	public void mostrarMensaje(String mensaje){
		JOptionPane.showMessageDialog(this, mensaje);
	}

}
